package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.common.domain.enumclass.Whether;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by oj on 2016/11/10 0010.
 */
@Entity
@Table(name = "red_packet_coupon")
@DynamicInsert
@DynamicUpdate
public class RedPacketCoupon extends IDEntityMall {

    @Column(columnDefinition = "varchar(255) comment'卡券名称'")
    private String couponName;
    @Column(columnDefinition = "varchar(255) comment'是否分享返利'")
    private Whether isShareReward = Whether.NO;
    @Column(columnDefinition = "bigint(20) comment'用户的OpenId'")
    private Long openId;
    @Column(columnDefinition = "bigint(20) comment'红包Id'")
    private Long redPacketId;
    @Column(columnDefinition = "varchar(255) comment'红包项ID'")
    private String redPacketItemId;
    @Column(columnDefinition = "varchar(255) comment'状态'")
    private String status;
    @Column(columnDefinition = "bigint(20) comment'领取人Id'")
    private Long takerId;
    @Column(columnDefinition = "varchar(255) comment'用户头像url'")
    private String customerHeadUrl;
    @Column(columnDefinition = "varchar(255) comment'用户名称'")
    private String customerName;

    public String getCouponName() {
        return couponName;
    }

    public void setCouponName(String couponName) {
        this.couponName = couponName;
    }

    public Long getOpenId() {
        return openId;
    }

    public Whether getIsShareReward() {
        return isShareReward;
    }

    public void setIsShareReward(Whether isShareReward) {
        this.isShareReward = isShareReward;
    }

    public void setOpenId(Long openId) {
        this.openId = openId;
    }

    public Long getRedPacketId() {
        return redPacketId;
    }

    public void setRedPacketId(Long redPacketId) {
        this.redPacketId = redPacketId;
    }

    public String getRedPacketItemId() {
        return redPacketItemId;
    }

    public void setRedPacketItemId(String redPacketItemId) {
        this.redPacketItemId = redPacketItemId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getTakerId() {
        return takerId;
    }

    public void setTakerId(Long takerId) {
        this.takerId = takerId;
    }

    public String getCustomerHeadUrl() {
        return customerHeadUrl;
    }

    public void setCustomerHeadUrl(String customerHeadUrl) {
        this.customerHeadUrl = customerHeadUrl;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @Override
    public String toString() {
        return "RedPacketCoupon{" +
                "couponName='" + couponName + '\'' +
                ", id=" + id +
                ", isShareReward=" + isShareReward +
                ", dateCreated=" + dateCreated +
                ", openId=" + openId +
                ", lastUpdated=" + lastUpdated +
                ", redPacketId=" + redPacketId +
                ", redPacketItemId='" + redPacketItemId + '\'' +
                ", isDelete=" + isDelete +
                ", status='" + status + '\'' +
                ", version=" + version +
                ", takerId=" + takerId +
                ", customerHeadUrl='" + customerHeadUrl + '\'' +
                ", customerName='" + customerName + '\'' +
                '}';
    }
}
